﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once
#include "GmModelFamily.h"
#include "IExternalObject.h"

namespace gcmp
{
    class ElementId;
    class IDocument;
    class IGraphicsStyle;
}

namespace gfam
{
    class GCMP_MODEL_FAMILY_EXPORT IFamilyLineStyleManager : public gcmp::IExternalObject
    {
        DEFINE_CAST_DERIVED(gfam::IFamilyLineStyleManager, gcmp::IExternalObject)
    public:
        static IFamilyLineStyleManager* Create(gcmp::IDocument* pDoc);
        static const IFamilyLineStyleManager* Get(gcmp::IDocument* pDoc);
        static IFamilyLineStyleManager* GetFW(gcmp::IDocument* pDoc);

        virtual int GetBuiltinLineStyleCount() const = 0;
        virtual gcmp::ElementId GetBuiltinLineStyleId(int index) const = 0;
        virtual const gcmp::IGraphicsStyle* GetBuiltinLineStyle(int index) const = 0;
        virtual gcmp::IGraphicsStyle* GetBuiltinLineStyleFW(int index) = 0;
        virtual std::vector<gcmp::IGraphicsStyle*> GetAllBuiltinLineStyles() const = 0;

        virtual int GetUserLineStyleCount() const = 0;
        virtual gcmp::ElementId GetUserLineStyleId(int index) const = 0;
        virtual const gcmp::IGraphicsStyle* GetUserLineStyle(int index) const = 0;
        virtual gcmp::IGraphicsStyle* GetUserLineStyleFW(int index) = 0;

        virtual gcmp::ElementId AddUserLineStyle(const std::wstring& name, double lineWidth, const gcmp::Color& lineColor, bool isSmart, const std::wstring& lineType, bool enable) = 0;
        virtual bool RemoveUserLineStyle(int index) = 0;

        virtual const gcmp::IGraphicsStyle* GetLineStyleByName(const std::wstring& name) const = 0;
    };
}